package com.mall.service.order.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mall.model.domain.OmsOrderItem;
import com.mall.service.order.mapper.OmsOrderItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OmsOrderItemService {
    @Autowired
    private OmsOrderItemMapper omsOrderItemMapper;

    public Long seleteBySn(String orderSn) {
        LambdaQueryWrapper<OmsOrderItem>qw=new LambdaQueryWrapper<>();
        qw.eq(OmsOrderItem::getOrderSn,orderSn);
        OmsOrderItem omsOrderItem = omsOrderItemMapper.selectOne(qw);
        Long orderId = omsOrderItem.getOrderId();
        return orderId;

    }
}
